﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Wilke.Interactive.Drone.PlayGround" x:Name="userControl" x:Class="Wilke.Interactive.Drone.PlayGround.JoystickBase"
             mc:Ignorable="d"
             d:DesignWidth="157.501"
             d:DesignHeight="157.501" ManipulationDelta="userControl_ManipulationDelta" ManipulationStarting="userControl_ManipulationStarting" ManipulationCompleted="userControl_ManipulationCompleted">
    <Grid x:Name="grid" Width="{Binding ActualWidth, ElementName=userControl}" Height="{Binding ActualHeight, ElementName=userControl}">
		<Ellipse x:Name="Ellipse" Stretch="Fill" StrokeThickness="7" StrokeLineJoin="Round" Margin="0" VerticalAlignment="Center" Width="{Binding ActualWidth, ElementName=grid}" Height="{Binding ActualHeight, ElementName=grid}">
			<Ellipse.Stroke>
				<LinearGradientBrush StartPoint="0.521571,0.493838" EndPoint="1.0077,0.493838">
					<GradientStop Color="#FFCEBBBB" Offset="0" />
					<GradientStop Color="#FF000000" Offset="1" />
				</LinearGradientBrush>
			</Ellipse.Stroke>
			<Ellipse.Fill>
				<RadialGradientBrush RadiusX="0.502388" RadiusY="0.502388" Center="0.522292,0.493632" GradientOrigin="0.522292,0.493632">
					<RadialGradientBrush.RelativeTransform>
						<TransformGroup />
					</RadialGradientBrush.RelativeTransform>
					<GradientStop Color="#FFB4ADAD" Offset="0" />
					<GradientStop Color="#FF6C6C6C" Offset="1" />
				</RadialGradientBrush>
			</Ellipse.Fill>
		</Ellipse>
		<Path x:Name="ArrowUp" Stretch="Fill" Data="F1 M 214.881,291.367L 231.372,300.679L 231.191,281.741L 214.881,291.367 Z " Margin="69.349,6.425,71.654,0" RenderTransformOrigin="0.5,0.5" Height="18" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment, Width, GridBox">
			<Path.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform Angle="90"/>
					<TranslateTransform/>
				</TransformGroup>
			</Path.RenderTransform>
			<Path.Fill>
				<RadialGradientBrush RadiusX="0.635249" RadiusY="0.681615" Center="0.709508,0.504067" GradientOrigin="0.709508,0.504067">
					<RadialGradientBrush.RelativeTransform>
						<TransformGroup>
							<SkewTransform CenterX="0.709508" CenterY="0.504067" AngleX="-6.56378" AngleY="0"/>
							<RotateTransform CenterX="0.709508" CenterY="0.504067" Angle="238.592"/>
						</TransformGroup>
					</RadialGradientBrush.RelativeTransform>
					<GradientStop Color="#FF5BAB5E" Offset="0.00862069"/>
					<GradientStop Color="#FF468649" Offset="0.470125"/>
					<GradientStop Color="#FF326234" Offset="1"/>
				</RadialGradientBrush>
			</Path.Fill>
		</Path>
		<Path x:Name="ArrowDown" Stretch="Fill" Data="F1 M 214.881,291.367L 231.372,300.679L 231.191,281.741L 214.881,291.367 Z " RenderTransformOrigin="0.5,0.5" Height="18" d:LayoutOverrides="Width, GridBox" Margin="69.328,0,71.674,6.842" VerticalAlignment="Bottom">
			<Path.RenderTransform>
				<TransformGroup>
					<ScaleTransform />
					<SkewTransform />
					<RotateTransform Angle="270" />
					<TranslateTransform />
				</TransformGroup>
			</Path.RenderTransform>
			<Path.Fill>
				<RadialGradientBrush RadiusX="0.635249" RadiusY="0.681615" Center="0.709508,0.504067" GradientOrigin="0.709508,0.504067">
					<RadialGradientBrush.RelativeTransform>
						<TransformGroup>
							<SkewTransform CenterX="0.709508" CenterY="0.504067" AngleX="-6.56378" AngleY="0" />
							<RotateTransform CenterX="0.709508" CenterY="0.504067" Angle="238.592" />
						</TransformGroup>
					</RadialGradientBrush.RelativeTransform>
					<GradientStop Color="#FF5BAB5E" Offset="0.00862069" />
					<GradientStop Color="#FF468649" Offset="0.470125" />
					<GradientStop Color="#FF326234" Offset="1" />
				</RadialGradientBrush>
			</Path.Fill>
		</Path>
		<Path x:Name="ArrowLeft" Stretch="Fill" Data="F1 M 214.881,291.367L 231.372,300.679L 231.191,281.741L 214.881,291.367 Z " Width="19.97" d:LayoutOverrides="Height, GridBox" HorizontalAlignment="Left" Margin="7.005,69.332,0,69.229">
			<Path.Fill>
				<RadialGradientBrush RadiusX="0.635249" RadiusY="0.681615" Center="0.709508,0.504067" GradientOrigin="0.709508,0.504067">
					<RadialGradientBrush.RelativeTransform>
						<TransformGroup>
							<SkewTransform CenterX="0.709508" CenterY="0.504067" AngleX="-6.56378" AngleY="0" />
							<RotateTransform CenterX="0.709508" CenterY="0.504067" Angle="238.592" />
						</TransformGroup>
					</RadialGradientBrush.RelativeTransform>
					<GradientStop Color="#FF5BAB5E" Offset="0.00862069" />
					<GradientStop Color="#FF468649" Offset="0.470125" />
					<GradientStop Color="#FF326234" Offset="1" />
				</RadialGradientBrush>
			</Path.Fill>
		</Path>
		<Path x:Name="ArrowRight" Stretch="Fill" Data="F1 M 214.881,291.367L 231.372,300.679L 231.191,281.741L 214.881,291.367 Z " RenderTransformOrigin="5.24,0.208" Width="19.97" d:LayoutOverrides="Height, GridBox" HorizontalAlignment="Right" Margin="0,69.331,6.968,69.228">
			<Path.RenderTransform>
				<TransformGroup>
					<ScaleTransform />
					<SkewTransform />
					<RotateTransform Angle="180" />
					<TranslateTransform X="-189.316" Y="11.057" />
				</TransformGroup>
			</Path.RenderTransform>
			<Path.Fill>
				<RadialGradientBrush RadiusX="0.635249" RadiusY="0.681615" Center="0.709508,0.504067" GradientOrigin="0.709508,0.504067">
					<RadialGradientBrush.RelativeTransform>
						<TransformGroup>
							<SkewTransform CenterX="0.709508" CenterY="0.504067" AngleX="-6.56378" AngleY="0" />
							<RotateTransform CenterX="0.709508" CenterY="0.504067" Angle="238.592" />
						</TransformGroup>
					</RadialGradientBrush.RelativeTransform>
					<GradientStop Color="#FF5BAB5E" Offset="0.00862069" />
					<GradientStop Color="#FF468649" Offset="0.470125" />
					<GradientStop Color="#FF326234" Offset="1" />
				</RadialGradientBrush>
			</Path.Fill>
		</Path>
        <Viewbox x:Name="JoystickBox" Margin="43.421,44,40.08,39.501" IsManipulationEnabled="True">
            <local:Thumb x:Name="JoystickThumb" Height="285" Width="285"/>
            <Viewbox.RenderTransform>
                <MatrixTransform/>
            </Viewbox.RenderTransform>
        </Viewbox>
    </Grid>
</UserControl>
